import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;

public class ErregistroOna extends Frame{
	Frame nireFrame;
	public ErregistroOna(Frame parent, Boolean modal) {
		nireFrame = parent;
		enableEvents(AWTEvent.WINDOW_EVENT_MASK);
		try {
			jbInit();
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}

	private void jbInit() throws Exception {
		final JFrame f = new JFrame();
		Container container = f.getContentPane();
		container.setLayout(null);
		JLabel ondo = new JLabel("Erregistroa ondo joan da");
		ondo.setBounds(70, 50, 150, 25);
		f.add(ondo);
		JButton onartu = new JButton("Onartu");
		onartu.setBounds(90, 90, 100, 25);
		f.add(onartu);
		f.setSize(300,200);
		f.setTitle("Euskaltoy");
		f.setVisible(true);
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		onartu.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(ActionEvent e) {
				onartu_actionPerformed(e);
				f.setVisible(false);
			}
		});
	}
	void onartu_actionPerformed(ActionEvent e) {
		new Frame1();
	}
}
